package com.sky.mapper;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

/**
 * @Description TODO
 * @Author itheima
 * @Date 2023-07-12 10:53
 */
@Mapper
public interface SetmealDishMapper {

    /**
     * 查询与指定菜品关联的总数
     * @param ids
     * @return
     */

    Integer getbycont(List<Long> ids);

    /**
     * 添加
     * @param setmealDishes
     */
    void addsetmealDish(List<SetmealDish> setmealDishes);

    /**
     * 删除
     * @param id
     */
    @Delete("delete from setmeal_dish where id=#{setmealId}")
    void deleteId(Long id);

    /**
     * 查询
     * @param id
     * @return
     */
    @Select("select * from setmeal_dish where setmeal_id=#{setmealId}")
    List<SetmealDish> getById(Long id);

    /**
     * 查询菜品套餐表与套餐表关联的个数
     * @param ids
     * @return
     */
    Integer getbyids(List<Long> ids);

    void deleteids(List<Long> ids);
}
